MonitorButton = function(buttons){
	this.buttons = buttons;	
};

MonitorButton.prototype = {
	
	/* 是否普通按钮 */	
	isCommon:function(){
		
	},
	
	/* 获取所有DIV信息 */
	getAllDiv:function(){
		var buttonDiv = "";
		buttonDiv += "<div class='panel-ctrls' data-actions-container='' data-action-collapse='{&quot;target&quot;: &quot;.panel-body&quot;}'>";
		for(var i=0;i<this.buttons.length;i++){
			if(typeof this.buttons[i] == "object"){
				
			}else{
				if(this.buttons[i] == "reload"){
					buttonDiv += this.getReloadButtonDiv();
				}
				else if(this.buttons[i] == "slide"){
					buttonDiv += this.getSlideButtonDiv();
				}
				else if(this.buttons[i] == "close"){
					buttonDiv +=  this.getRemoveButtonDiv();
				}
			}
		}
		buttonDiv += "</div>";
		return buttonDiv;	
	},
	
	/* 获取移除按钮信息 */
	getRemoveButtonDiv:function(){
		var remove = "";
		remove += this.getCommonButtonDiv("fa fa-times");
		return remove;
	},
	
	/* 获取下拉按钮信息 */
	getSlideButtonDiv:function(){
		var slide = "";
		slide += this.getCommonButtonDiv("fa fa-chevron-up");
		return slide;
	},
	
	/* 获取重置按钮信息 */
	getReloadButtonDiv:function(){
		var reload = "";
		reload += this.getEditButtonDiv("fa fa-cog", ".cacheModel");
		return reload;
	},
	
	/* 获取通用按钮信息 */
	getCommonButtonDiv:function(cssClass){
		var common = "";
		common += "<span class='button-icon has-bg cursor-pointer'>";
		common += "<i class='"+cssClass+"'></i>";
		common += "</span>";
		common += "&nbsp;&nbsp;";
		return common;
	},
	
	/* 获取弹窗按钮信息 */
	getEditButtonDiv:function(cssClass,dataTarget){
		var edit = "";
		edit += "<span class='button-icon has-bg cursor-pointer'>";
		edit += "<a class='a_white' data-toggle='modal' data-target='"+dataTarget+"'>";
		edit += "<i class='"+cssClass+"'></i>";
		edit += "</a>";
		edit += "</span>";
		edit += "&nbsp;&nbsp;";
		return edit;
	}
		
};